#include <iostream>
using namespace std;

int main()
{
	int n = 0, x = 0;
	cin >> n;
	int a[10010];
	for(int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	cin >> x;
	int i = 0;
	for(i = 0; i < n; i++)
	{
		
		if(x == a[i])
		{
			cout << i << endl;
			break;
		}
	}
	if(i == n)
		cout << -1 << endl;
	return 0;
 } 
